import httpRequest from './ajax';
const baseUrl = 'http://localhost:4000/'
const api = {
    getCityList(data){
        return httpRequest('https://www.easy-mock.com/mock/5b574c739a5ff5320380791b/tuniu/citiesInfo')
    },
    mock() {
        return httpRequest('http://localhost:3000/posts')
    },
    postData(data) {
        return httpRequest('http://localhost:3000/posts',data,'post')
    },
    getGoodsList() {
        return httpRequest(baseUrl + 'goods')
    },
    getGoodDetails(id) {
        return httpRequest(baseUrl + 'goods/' + id)
    }
}

export default api